import { baseGET, basePOST, baseDETELE } from './baseApi'
import API from './apiList'

export function _addGroup (groupName) {
  return basePOST(API.addGroup, { groupName })
}
export function _getGroupList () {
  return baseGET(API.getGroup)
}
export function _getSprintList (query) {
  return baseGET(API.getSprint, query)
}
export function _addSprint (sprintName, sprintStartTime, sprintEndTime) {
  return basePOST(API.addSprint, { sprintName, sprintStartTime, sprintEndTime })
}
export function _getLogList (query) {
  return baseGET(API.getLog, query)
}
export function _addLog (body) {
  return basePOST(API.addLog, body)
}
export function _modifySprint (body) {
  return basePOST(API.modifySprint, body)
}
export function _editGroup (body) {
  return basePOST(API.editGroup, body)
}
export function _deleteLog (logId) {
  return baseDETELE(`${API.deleteLog}/${logId}`)
}
export function _getLogDetails (query) {
  return baseGET(API.getLogDetails, query)
}
// 改自坑爹的后端
export function _deleteGroup (groupId) {
  return basePOST(`${API.deleteGroup}?groupId=${groupId.groupId}`)
}
export function _fixLog (body) {
  return basePOST(API.fixLog, body)
}
